package com.logwire.config.shiro;import org.apache.shiro.web.filter.authc.BearerHttpAuthenticationFilter;import org.springframework.http.HttpMethod;import org.springframework.http.HttpStatus;import javax.servlet.ServletRequest;import javax.servlet.ServletResponse;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;/** * @author yhou * @ProjectName app-manager-api * @description * @date 2022/09/27 4:45 PM */public class TokenFilter extends BearerHttpAuthenticationFilter {	@Override	protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {		if (HttpMethod.OPTIONS.name().equalsIgnoreCase(((HttpServletRequest) request).getMethod())) {			((HttpServletResponse) response).setStatus(HttpStatus.OK.value());			return true;		}		return super.onAccessDenied(request, response);	}}